<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<meta name="viewport" content="width=device-width, initial-scale=1">
	<title></title>
	<style type="text/css">
		*{
			margin: 0;
			padding: 0;
		}
		.box div{
			width: 100%;
			height: 400px;
		/*	提前将图片加载出来		*/
			background: url(a1.jpg),url(a2.jpg),url(a3.jpg),url(a4.jpg) no-repeat;
			background-size: cover;
			inset: 0;
			position: absolute;
			animation:cs 10s infinite ;
		}
		@keyframes cs{
			0%{
				background: url(a1.jpg);
				background-size:cover ;
			}
			25%{
				background: url(a2.jpg);
				background-size:cover ;
			}
			50%{
				background: url(a3.jpg);
				background-size:cover ;
			}
			100%{
				background: url(a4.jpg);
				background-size:cover ;
			}
		}
	</style>
</head>
<body>
	<div class="box">
		<div></div>
	</div>
</body>
</html>